﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SlideControlDemo {
  public partial class Form1 : Form {

    private Slides.SlideA _a;
    private Slides.SlideB _b;
    private Slides.SlideC _c;

    public Form1() {
      InitializeComponent();

      _a = new SlideControlDemo.Slides.SlideA();
      _b = new SlideControlDemo.Slides.SlideB();
      _c = new SlideControlDemo.Slides.SlideC();

      _slide_control.AddSlide(_a);
      _slide_control.AddSlide(_b);
      _slide_control.AddSlide(_c);

      _slide_control.Selected = _a;
      _slide_control.SlideSpeed = 400;
      _slide_control.SlideChanged += new EventHandler<SlickInterface.SlideChangedArgs>(_slide_control_SlideChanged);
    }

    void _slide_control_SlideChanged(object sender, SlickInterface.SlideChangedArgs e) {
      _btn_back.Enabled = _slide_control.HasPrevious;
    }

    private void _btn_back_Click(object sender, EventArgs e) {
      _slide_control.Backward();
    }
  }
}
